using Assets.Scripts.GDK;
using UnityEngine;
using UnityEngine.UI;

namespace Brick
{
	public class PropItem : gdk_base_layer
	{
		public Text textName;

		public Text textDes;

		public Image image;

		public Sprite[] sp;

		private int _splitIndex;

		public void OnData(int splitIndex, PropModel curProp)
		{
			_splitIndex = splitIndex;
			if ((bool)textName)
			{
				textName.text = curProp.propName;
			}
			if ((bool)textDes)
			{
				textDes.text = curProp.des;
			}
			image.sprite = sp[splitIndex];
			image.SetNativeSize();
		}

		public override void OnLoad()
		{
		}

		public override void OnStart()
		{
		}

		public override void UnLoad()
		{
		}
	}
}

